package com.lsn.watermall.controller;

import com.lsn.watermall.entity.Result;
import com.lsn.watermall.entity.UserBean;
import com.lsn.watermall.entity.WaterBean;
import com.lsn.watermall.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.validation.FieldError;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/water")
public class WaterController {
    @RequestMapping("/index")
    public String index(){
        return "index";
    }

    @RequestMapping("/addWater")
    public Result addWater(@Validated @RequestBody WaterBean waterBean){
        System.out.println("waterBean="+waterBean);
        return Result.ok();
    }


}
